3-dimensional reconstruction method, 3-dimensional reconstruction device, and storage medium

ABSTRACT

The disclosure provides 3D reconstruction methods and devices. The method includes: obtaining data captured by the camera and data captured by the inertial measurement unit; obtaining a pose of the camera based on the data; obtaining an adjustment value of the pose of the camera and an adjustment value of bias of the inertial measurement unit; updating the pose of the camera based on the adjustment value of the pose of the camera; determining whether the adjustment value of bias of the inertial measurement unit is less than a preset value; in response to the adjustment value of bias of the inertial measurement unit being greater than or equal to the preset value, determining that a current loop for 3-dimensional reconstruction is an error loop; removing the error loop; and constructing a 3-dimensional model for surroundings of the camera based on the updated pose of the camera and remaining loops.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to Chinese Patent Application No. 201910968740.7, filed on Oct. 12, 2019, the entire contents of which are incorporated herein by reference for all purposes.

FIELD

The disclosure relates to the field of simultaneous localization and mapping (SLAM) technologies, and more particularly to a 3-dimensional (3D) reconstruction method, a 3D reconstruction device, and a computer-readable storage medium, and further more particularly to a 3D reconstruction method based on global optimization and loop closure detection.

BACKGROUND

3D reconstruction requires higher accuracy, higher efficiency and more robust as the development and application of robot indoor navigation, virtual reality and augmented reality technologies. The SLAM technologies utilize a RGBD (red, green, blue and depth) camera and an IMU (inertial measurement unit) for 3D reconstruction of corresponding surroundings. Through the combinations of visual information (from the camera) and IMU information (from the IMU), a situation of camera rapid movement and few feature points in the surroundings may be reconstructed.

However, in the process of fusing the visual information and the IMU information, it needs to estimate a large number of status variables, and has a low fusion and calculation efficiency.

SUMMARY

The disclosure provides a 3-dimensional reconstruction method implemented in a portable terminal with a camera and an inertial measurement unit. The method includes: obtaining data captured by the camera and data captured by the inertial measurement unit; obtaining a pose of the camera based on the data captured by the camera and the data captured by the inertial measurement unit; obtaining an adjustment value of the pose of the camera and an adjustment value of bias of the inertial measurement unit based on a second-order statistics of the data captured by the camera and a pre-integration of the data captured by the inertial measurement unit; updating the pose of the camera based on the adjustment value of the pose of the camera; determining whether the adjustment value of bias of the inertial measurement unit is less than a preset value; in response to the adjustment value of bias of the inertial measurement unit being greater than or equal to the preset value, determining that a current loop for 3-dimensional reconstruction is an error loop, the current loop being a connection of the pose of the camera with a previous pose of the camera; removing the error loop; and constructing a 3-dimensional model for surroundings of the camera based on the updated pose of the camera and remaining loops.

The disclosure provides a 3-dimensional reconstruction device implemented in a portable terminal with a camera and an inertial measurement unit. The device includes a processor, and a memory for storing instructions executable by the processor. The processor is configured to perform the instructions stored in the memory to carry out the above method.

The disclosure provides a non-transitory computer-readable storage medium having stored therein instructions that, when executed by a processor of a terminal, causes the terminal to carry out the above method.

Additional aspects and advantages of embodiments of the disclosure will be given in part in the following descriptions, become apparent in part from the following descriptions, or be learned from the practice of the embodiments of the disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other aspects and advantages of embodiments of the disclosure will become apparent and more readily appreciated from the following descriptions made with reference to the drawings, in which:

FIG. 1 is a flowchart of a 3-dimensional reconstruction method according to some embodiments of the disclosure.

FIG. 2 is a flowchart of a 3-dimensional reconstruction method according to some embodiments of the disclosure.

FIG. 3 is a schematic diagram showing a system structure for 3-dimensional reconstruction according to some embodiments of the disclosure.

FIG. 4 is a schematic diagram showing a constraint formed by visual and IMU measurement results according to some embodiments of the disclosure.

FIG. 5 is a schematic diagram showing a 3-dimensional reconstruction model according to some embodiments of the disclosure.

FIG. 6 is a schematic diagram showing a Jacobian in a Gauss-Newton function according to some embodiments of the disclosure.

FIG. 7 is a schematic diagram showing an experimental device according to some embodiments of the disclosure.

FIG. 8 is a schematic diagram showing an electronic device for implementing solutions according to some embodiments of the disclosure.

DETAILED DESCRIPTION

Reference will be made in detail to embodiments of the disclosure. The same or similar elements and the elements having same or similar functions are denoted by like reference numerals throughout the descriptions. The embodiments described herein with reference to drawings are explanatory, illustrative, and used to generally understand the disclosure. The embodiments shall not be construed to limit the disclosure.

The fusing of visual information and IMU information may utilize extended Kalman filtering methods or optimization methods in the related art. The filtering methods have poor accuracy, and the optimization methods have poor efficiency. Furthermore, the transformation matrix of the camera and the IMU is important in the fusing process, but this matrix is usually calibrated offline or through online initialization process in the related art. In addition, the loop closure detection in the fusing process may achieve global consistency of 3D reconstruction.

In the process of fusing visual information and IMU information, it is necessary to estimate a large number of state variables. The optimization methods have poor fusion and calculation efficiency. If the real-time performance is ensured, global optimization may be not achieved, and if the global optimization is ensured, the methods cannot run on portable devices in real time.

The disclosure directly calculates the most complicated part in the optimization problem through second-order statistics of the visual information by analyzing main sources of calculation complexity in the optimization problem, and there is no accuracy loss in this accelerated calculation method, realizing real-time global optimization of vision and IMU data, and providing more accurate and robust pose estimation in 3D reconstruction. The online self-calibration is realized on the relative position of the camera and the IMU in the disclosure. The self-calibration is coupled to the global optimization, and there is no problem of cumulative errors. The accurate estimated zero-bias value for the IMU may be obtained through the global optimization of the disclosure, and the correctness of the loop detection may be determined according to changes of the estimated zero-bias value.

FIG. 1 is a flowchart of a 3-dimensional reconstruction method according to some embodiments of the disclosure. In some embodiments, this method may be implemented in the portable terminal with the camera and the inertial measurement unit. As illustrated in FIG. 3, the method includes the actions in the following blocks.

At block 11, data captured by the camera and data captured by the inertial measurement unit are obtained.

At block 12, a pose of the camera is obtained based on the data captured by the camera and the data captured by the inertial measurement unit.

At block 13, an adjustment value of the pose of the camera and an adjustment value of bias of the inertial measurement unit are obtained based on a second-order statistics of the data captured by the camera and a pre-integration of the data captured by the inertial measurement unit.

At block 14, the pose of the camera is updated based on the pose adjustment value.

At block 15, it is determined whether the adjustment value of bias of the inertial measurement unit is less than a preset value.

At block 16, in response to the adjustment value of bias of the inertial measurement unit being greater than or equal to the preset value, it is determined that a current loop for 3-dimensional reconstruction is an error loop, the current loop being a connection of the pose of the camera with a previous pose of the camera.

At block 17, the error loop is removed.

At block 18, a 3-dimensional model for surroundings of the camera is constructed based on the updated pose of the camera and remaining loops.

The removing error loops may reduce the error in the constructing of the 3D model.

At block 19, in response to the adjustment value of bias of the inertial measurement unit being less than the preset value, it is determined that the current loop for 3-dimensional reconstruction is a right loop, and the current loop for 3-dimensional reconstruction is remained

At block 20, in response to the adjustment value of bias of the inertial measurement unit being less than the preset value, the bias of the inertial measurement unit is updated based on the adjustment value of bias of the inertial measurement unit.

FIG. 2 is a flowchart of a 3-dimensional reconstruction method according to some embodiments of the disclosure. This method may achieve high-efficiency global optimization of visual information and IMU information without loss of accuracy, may not have the problem of cumulative errors caused by inaccurate calibration, and may accurately determine correctness of loops, which is simple and easy to implement. As shown in FIG. 2, the method may include actions in the following blocks.

At block S101, visual information and IMU information are obtained. An optimization equation may be constructed based on second-order statistics of the visual information and pre-integration of the IMU information, to perform real-time online global optimization based on CPU (Central Processing Unit).

It is understandable that, as shown in FIG. 3, the global optimization of the visual information and the IMU information may be realized. The optimization equation may be constructed based on the second-order statistics of the visual information and the pre-integration of the IMU information, thereby accelerating an optimization speed greatly, and realizing the real-time online global optimization based on CPU.

In some embodiments of the disclosure, obtaining the visual information and the IMU information and constructing the optimization equation based on the second-order statistics of the visual information and the pre-integration of the IMU information may include: in an optimization process, a keyframe strategy is adopted so that status variables of keyframes participate in the global optimization, and status variables of other frames are assigned through the closest keyframe.

In detail, the keyframe strategy is adopted in the optimization, and the status variables of the keyframes participate in the global optimization, and the status variables of other frames are assigned by the closest keyframe.

The symbols may be defined as follows. The i^(th) keyframe is denoted as F_(i). F_(i) may include a color image I_(i) and a depth map D_(i), which are captured by the RGBD camera. For the keyframe F_(i), status variables that need to be optimized are R_(ci), P_(ci), V_(Ii), b_(i) ^(g) and b_(i) ^(a), which represent a rotation of the camera, a translation of the camera, a velocity of the IMU, a bias of angular velocity of the IMU, and a bias of acceleration of the IMU, respectively. R_(Ii) represents a rotation of the IMU. P_(Ii) represents a translation of the IMU. R₀ and P₀ represent a Cam-IMU transformation from the camera to the IMU. g represents an initial gravity value. R_(g) represents a direction of gravity. The Cam-IMU transformation and the direction of gravity, which are obtained through the pre-calibration or initialization process, will cause error accumulation, and slight errors will gradually be enlarged as the path grows.

On the other hand, the Cam-IMU transformation and the direction of gravity, obtained through the global optimization, will become more and more accurate, so as to achieve global consistency and avoid error accumulation. Therefore, in some embodiments of the disclosure, status variables of the camera (i.e., R_(ci), P_(ci), V_(Ii), b_(i) ^(g) and b_(i) ^(a)), the Cam-IMU transformation (i.e., R₀ and P₀) and the direction of gravity R may be estimated in an overall global optimization function. In order to simplify representations, all variables to be optimized are denoted as S, in which S={R,P,V,b^(g),b^(a),R₀,P₀,R_(g)}, where {R,P,V,b^(g),b^(a)}={R_(ci), P_(ci), V_(Ii), b_(i) ^(g), b_(i) ^(a), i=0, . . . , N−1}, and N represents the number of the keyframes. Sequential IMU measurements between nearby frames are integrated to obtain an IMU constraint (or a motion constraint) C_(i,j+1) ^(I). A visual constraint C_(i,j) ^(F) may be obtained from registered frame pairs. All registered frame pairs may be denoted as Ω. The constraint relationship formed by the visual and IMU measurements may be shown in FIG. 4.

At block S102, a transformation matrix (i.e., the Cam-IMU transformation) is coupled into the global optimization function to provide an accurate estimated transformation matrix, and in the global optimization process, the estimated status variables of the IMU and the camera are provided, so that the IMU information may be used for positioning when fast moving and few feature points exist, so as to continue mapping.

It is understandable that, as shown in FIG. 3, the optimization of the transformation matrix is coupled in the global optimization function, which may realize online calibration without visual initialization. The optimization of the transformation matrix will become more and more accurate, avoiding error accumulation. The global optimization provides accurate estimated status, so that the system may continue to map when the system is moving fast and there are few feature points in the surrounding of the system. In the meshing thread, TSDF (truncated signed distance function) fusion provides a 3D model, and the 3D reconstruction result is shown in FIG. 5.

Further, in some embodiments of the disclosure, the global optimization process further includes: obtaining Jacobian matrixes according to error terms of the visual information and the IMU information; minimizing an error function according to the Jacobian matrixes, and obtaining update amounts of the status variable through sparse matrix multiplication to realize the global optimization of visual information and IMU information.

It is understandable that, in the global optimization of visual information and IMU information, the second-order statistics of visual feature points may be used to construct the Jacobian matrix of the visual part, and combined with the pre-integration of the IMU information to construct the overall optimization equation. This greatly accelerates the calculation speed of global optimization. The transformation matrix of the camera and the IMU is coupled in the global optimization function, so that self-calibration is realized in the global optimization, and there is no problem of calibration error accumulation.

In detail, camera status variables and global variables S={R, P, V, b^(g), b^(a), R₀, P₀, R} may be estimated based on the following formula of:

$\begin{matrix} {{S^{*} = {{\arg \; {\min\limits_{S}{\sum\limits_{i = 0}^{N - 1}{C_{i,{i + 1}}^{I}(S)}}}} + {\sum\limits_{{({i,j})} \in \Omega}^{n}{\lambda_{1}{C_{i,j}^{F}(S)}}}}},} & (1) \end{matrix}$

where, λ₁ represents a coefficient constant, and n represents the number of the registered frame pairs.

After obtaining the formula (1), a Gauss-Newton optimization method is used to calculate the update amounts of the status and global variables, to realize minimizing the formula (1), based on the following formula of:

δ=−(J(ξ)^(T) J(ξ))⁻¹ J(ξ)^(T) r(ξ)  (2),

where, ξ represents the status and global variables, J(ξ) represents a Jacobian matrix obtained by the function (1) deriving all the status and global variables, r(ξ) represents an error term obtained by the function (1), and δ represents the obtained update amounts. The calculation process of J(ξ)^(T) J(ξ) and J(ξ)^(T)r(ξ) is main sources of calculation complexity in the optimization problem. The acceleration and decomposition process for J(ξ)^(T)J(ξ) is described below. Meanwhile, J(ξ)^(T)r(ξ) may be accelerated by the same method as J(ξ)^(T)J(ξ).

It may be seen from FIG. 6 that the overall Jacobian matrix J(ξ) is a combination of the Jacobian matrix obtained by the visual error term and the Jacobian matrix obtained by the IMU error term. The computational complexity of C^(F) is O(k*N_(corr)), and the computational complexity of C^(I) is O(N), where N is the number of keyframes, N_(corr) is the number of registered frame pairs, and k is an average number of matched feature point pairs for each registered frame pair. The number of keyframes is much smaller than the number of matched feature point pairs, so the computational complexity of the optimization problem mainly lies in C^(F), i.e., the computational cost of J^(T)J is mainly in J_(A) ^(T)J_(A) of FIG. 6. The key to speeding up calculations is to speed up calculations on J_(A) ^(T)J_(A). J_(A) is the Jacobian matrix of matched feature point pairs. J_(A) ^(T)J_(A) may be directly obtained through the second-order statistics of matched feature points in the disclosure, and the computational complexity of C^(F) is reduced from O(k*N_(corr)) to O(N_(corr)) without loss of accuracy, thereby significantly reducing computational complexity of J^(T)J. The following is the specific method of calculating J_(A) ^(T)J_(A) by second-order statistics.

For each frame pair (F_(i), F_(j)), matched feature points C_(i,j)={C_(i,j) ^(k)=(p_(i) ^(k), p_(j) ^(k))} may be obtained based on feature matching, where p_(i) ^(k) represents coordinates of the k^(th) feature point observed in the i^(th) frame, and p_(j) ^(k) represents coordinates of the k^(th) feature point observed in the j^(th) frame. For the i^(th) frame, T_(ci) represents a rigid transformation matrix in Euclidean space which can be represented by Lie algebra ξ_(i) on the SE3 manifold. ξ_(i) represents a corresponding Lie algebra. R_(ci) represents a rotation part of the rigid transformation matrix and P_(ci) represents a translation part of the rigid transformation matrix. T_(ci)=[R_(ci)|P_(ci)]. After finding the matched feature point pairs in the frame pairs, for each matched feature point pair, the residual for every corresponding point may be obtained by a formula of:

r _(i,j) ^(k)(ξ)=T(ξ_(i))P _(i) ^(k) −T(ξ_(j))P _(j) ^(k)  (3).

By combining all the residual of corresponding points, the feature correspondence constraint may be obtained by a formula of:

$\begin{matrix} {{C_{i,j}^{F} = {\sum\limits_{k = 0}^{{C_{i,j}} - 1}{{{T_{i}P_{i}^{k}} - {T_{j}P_{j}^{k}}}}^{2}}},} & (4) \end{matrix}$

where, P_(i) ^(k) represents homogeneous coordinates of point coordinates p_(i) ^(k) under the camera coordinate system for the i^(th) frame; P_(j) ^(k) represents homogeneous coordinates of point coordinates p_(j) ^(k) under the camera coordinate system for the j^(th) frame; a camera pose T₀ of the first frame is set to an unit matrix, thereby initializing the world coordinate system. For visual initialization, the pose estimation may be obtained by minimizing the formula (4). For adjacent keyframes F_(i) and F_(j), the pose R_(ci), P_(ci) and the pose R_(cj), P_(cj) may be obtained visually.

A Jacobian matrix for derivation of pose R_(ci), P_(ci) with respect to r_(i,j) ^(k)(ξ) may be denoted as follows:

J _(i) ^(k)(ξ_(i))=[I _(3*3)−[R(Φ_(i))P _(i) ^(i)]{circumflex over ( )}]  (5).

A following submatrix may be obtained for one feature point pair between frame i and frame j, as a formula of:

J _(m)=[0 . . . J _(i) ^(k)(ξ_(i)) . . . 0 . . . J _(j) ^(k)(ξ_(j)) . . . 0]  (6).

For a corresponding frame pair between frame i and frame j, the Jacobian product J_(C) _(i,j) ^(T)J_(C) _(i,j) is the summation of all matched feature point submatrices as a formula of:

$\begin{matrix} {{J_{C_{i,j}}^{T}J_{C_{i,j}}} = {\sum\limits_{m \in C_{i,j}}{J_{m}^{T}{J_{m}.}}}} & (7) \end{matrix}$

There are many corresponding frame pairs in the visual observation and J_(C) _(i,j) ^(T)J_(C) _(i,j) is a submatrix of the original Jacobian matrix J_(A) ^(T)J_(A), which is shown as follows:

J _(A) ^(T) J _(A) =ΣJ _(C) _(i,j) ^(T) J _(C) _(i,j)   (8).

J_(m) has two non-zero 3×6 matrices, so J_(m) ^(T)J_(m)(m∈C_(i,j)) has four non-zero 6×6 matrices at the same blocks. As the summation of J_(m) ^(T)J_(m), J_(C) _(i,j) ^(T)J_(C) _(i,j) has four non-zero 6×6 matrices too and can be calculated by the second-order statistics of the structure terms. The four non-zero 6×6 matrices are denoted by A_(C) _(i,j) (i,i), A_(C) _(i,j) (i,j), A_(C) _(i,j) (j,i), and A_(C) _(i,j) (j,j). The calculation process of A_(C) _(i,j) (i,j) may be shown as follows and the other sub-matrices may be calculated in the same way:

$\begin{matrix} {{A_{C_{i,j}}\left( {i,j} \right)} = {{\sum\limits_{k = 0}^{{C_{i,j}} - 1}{J_{ik}^{T}J_{jk}}} = {\begin{bmatrix} {{C_{i,j}}I_{3 \times 3}} & {- \left\lbrack {R_{j}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{j}^{k}}} \right\rbrack_{\times}} \\ {- \left\lbrack {R_{i}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{i}^{k}}} \right\rbrack_{x}} & {\sum\limits_{k = 0}^{{C_{i,j}} - 1}{\left\lbrack {R_{i}P_{i}^{k}} \right\rbrack_{\times}^{T}\left\lbrack {R_{j}P_{j}^{k}} \right\rbrack}_{\times}} \end{bmatrix}.}}} & (9) \end{matrix}$

The result of J_(C) _(i,j) ^(T)J_(C) _(i,j) may be obtained directly from the second-order statistic of vision through the formula (9), and J_(A) ^(T)J_(A) is the summation of J_(C) _(i,j) ^(T)J_(C) _(i,j) . In this way, the result of J_(A) ^(T)J_(A) may be obtained by the second-order statistics of vision, and the calculation complexity of each Jacobian matrix of the vision part is greatly reduced.

The following describes the calculation process of the Jacobian matrix of the IMU part.

The transformation matrix (i.e., the Cam-IMU transformation matrix) R₀ and P₀, may be used to obtain the following transformation through the following formula of:

R _(Ii) =R _(ci) R ₀,

P _(Ii) =P _(ci) +R _(ci) P ₀  (10).

The angular velocity and acceleration obtained by the IMU are denoted as

and

, the actual angular velocity and acceleration are denoted as ω and α, and the noise of the angular velocity and acceleration are denoted as η^(g) and η^(a). These parameters have the following relations of:

(t)=ω(t)+b ^(g)(t)+η^(g)(t)

(t)=R _(I) ^(T)(t)(a(t)−g)+b ^(a)(t)+η^(a)(t)  (11).

Assuming that the angular velocity and acceleration remain unchanged at the moment t−[t+Δt], the status at the moment t+Δt may be obtained from the status at the moment t by the following formula of:

R _(I)(t+Δt)=R _(I)(t)Exp(ω(t)Δt),

V _(I)(t+Δt)=V _(I)(t)+a(t)Δt,

P _(I)(t+Δt)=P _(I)(t)+V _(I)(t)Δt+½a(t)Δt ²,  (12).

The formula (11) is brought into the formula (12), the following relationship may be obtained:

R _(I)(t+Δt)=R _(I)(t)Exp((

(t)−b ^(g)(t)−η^(gd)(t))Δt),

V _(I)(t+Δt)=V _(I)(t)+gΔt+R _(I)(t)(

(t)−b ^(a)(t)−η^(ad)(t))Δt,

P _(I)(t+Δt)=P _(I)(t)+V _(I)(t)Δt+½gΔt ²+½R _(I)(t)(

(t)−b ^(a)(t)−η^(ad)(t))Δt ²,  (13).

The pose relationship from the moment i to the moment j may be obtained through the integration of multiple pieces of IMU data by the formula of:

$\begin{matrix} {{R_{Ij} = {R_{Ii}{\prod\limits_{k = i}^{j - 1}\; {{Exp}\left( {\left( {- b_{k}^{g} - \eta_{k}^{g}} \right)\Delta \; t} \right)}}}},{V_{Ij} = {V_{Ii} + {g\; \Delta \; t_{ij}} + {\sum\limits_{k = i}^{j - 1}{{R_{k}\left( {- b_{k}^{a} - \eta_{k}^{ad}} \right)}\Delta \; t}}}},{P_{Ij} = {P_{Ii} + {\sum\limits_{k = i}^{j - 1}{v_{k}\Delta \; t}} + {\frac{1}{2}g\; \Delta \; t_{ij}^{2}} + {\frac{1}{2}{\sum\limits_{k = i}^{j - 1}{{R_{k}\left( {- b_{k}^{a} - \eta_{k}^{a}} \right)}\Delta \; t^{2}}}}}},.} & (14) \end{matrix}$

In order to avoid repeated integration, the following pose changes may be calculated by the formula of:

$\begin{matrix} {\left. \mspace{79mu} {{{\Delta \; R_{ij}B\mspace{11mu} R_{i}^{T}R_{j}} = {\prod\limits_{k = i}^{j - 1}\; {{Exp}\left( {\left( {- b_{k}^{g} - \eta_{k}^{g}} \right)\Delta \; t} \right)}}},\mspace{79mu} {{\Delta \; V_{ij}B\mspace{14mu} {R_{i}^{\bullet}\left( {v_{j} - v_{i} - {g\; \Delta \; t_{ij}}} \right)}} = {\sum\limits_{k = i}^{j - 1}{\Delta \; {R_{ik}\left( {- b_{k}^{a} - \eta_{k}^{a}} \right)}\Delta \; t}}},{{\Delta \; P_{ij}B\mspace{11mu} {R_{i}^{\bullet}\left( {p_{j} - p_{i} - {v_{i}\Delta \; t_{ij}} - {\frac{1}{2}g\; \Delta \; t_{ij}^{2}}} \right)}} = {{\sum\limits_{k = i}^{j - 1}\left\lbrack {{\Delta \; v_{ik}\Delta \; t} + {\frac{1}{2}\Delta \; {R_{ik}\left( {- b_{k}^{a} - \eta_{k}^{a}} \right)}\Delta \; t^{2}}} \right\rbrack} = {\sum\limits_{k = i}^{j - 1}{\left\lbrack {\frac{3}{2}\Delta \; {R_{ik}\left( {- b_{k}^{a} - \eta_{k}^{a}} \right)}\Delta \; t^{2}} \right\rbrack t}}}}} \right\rbrack,.} & (15) \end{matrix}$

The noise may be separated by the following way:

Δ   = ∏ k = i j - 1   Exp  ( ( - b k g )  Δ   t ) ,  Δ   R ij ; Δ   ij  ∏ k = i j - 1   Exp  ( - Δ   k + 1 , j •  J r k  η k gd  Δ   t ) , . ( 16 )

Δ

_(ij) and Δ

_(ij) may be obtained by the same method.

After obtaining the camera pose through the visual method, the pose of the IMU may be obtained by conversion, so that the following pose changes are denoted between adjacent keyframes by the formula of:

ΔR _(ij) =R _(Ii) ^(T) R _(Ij),

ΔV _(ij) BR _(Ii) ^(•)(V _(Ij) −V _(Ii) −gΔt _(ij)),

ΔP _(ij) BR _(i) ^(•)(P _(Ij) −P _(Ii) −V _(Ii) Δt _(ij)−½gΔt _(ij) ²),  (17).

At the same time, the relative pose changes Δ

_(ij), Δ

_(ij), and Δ

_(ij) between keyframes may be obtained through the integration of IMU data, and the following error function may be obtained by combining the formula (17):

r _(VR) _(ij) =Log(ΔR _(ij) A

_(ij)),

r _(VV) _(ij) =ΔV _(ij)−Δ

_(ij), and

r _(VP) _(ij) =ΔP _(ij)−Δ

_(ij),  (18).

By linearizing the zero offset, the formula (18) may be denoted as follows:

$\begin{matrix} {\mspace{85mu} {{r_{{VR}_{ij}} = {{{Log}\left( {\left( {V\; \left( {\overset{\_}{b}}_{i}^{g} \right){{Exp}\left( {\frac{{\partial V}\; {\overset{\_}{R}}_{ij}}{\partial b^{g}}\delta \; b^{g}} \right)}} \right)^{T}R_{Ii}^{T}R_{Ij}} \right)}}},{{r_{{VV}_{ij}}{R_{Ii}^{T}\left( {V_{Ij} - V_{Ii} - {gVt}_{ij}} \right)}} - {\quad{{\left\lbrack {{V\; \left( {{\overset{\_}{b}}_{i}^{g},{\overset{\_}{b}}_{i}^{a}} \right)} + {\frac{{\partial V}\; {\overset{\_}{V}}_{ij}}{\partial b^{g}}\delta \; b^{g}} + {\frac{{\partial V}\; {\overset{\_}{V}}_{ij}}{\partial b^{a}}\delta \; b^{a}}} \right\rbrack r_{{VP}_{ij}}{R_{Ii}^{T}\left( {P_{Ij} - P_{Ii} - {V_{Ii}{Vt}_{ij}} - {\frac{1}{2}g\; {Vt}_{ij}^{2}}} \right)}} - {\quad{\left\lbrack {{V\left( {{\overset{\_}{b}}_{i}^{g},{\overset{\_}{b}}_{i}^{a}} \right)} + {\frac{{\partial V}\; {\overset{\_}{P}}_{ij}}{\partial b^{g}}\delta \; b^{g}} + {\frac{{\partial V}\; {\overset{\_}{P}}_{ij}}{\partial b^{a}}\delta \; b^{a}}} \right\rbrack,.}}}}}}} & (19) \end{matrix}$

The formula (10) may be used to bring in the camera pose, and R_(g) may be replaced by R_(g)g to obtain the following formula (20):

$\begin{matrix} {{r_{{VR}_{ij}}{{Log}\left( {\left( {V\; \left( {\overset{\_}{b}}_{i}^{g} \right){{Exp}\left( {\frac{{\partial V}\; {\overset{\_}{R}}_{ij}}{\partial b^{g}}\delta \; b^{g}} \right)}} \right)^{T}\left( {R_{ci}R_{0}} \right)^{T}R_{cj}R_{0}} \right)}},{{r_{{VV}_{ij}}\left( {R_{ci}R_{0}} \right)^{T}\left( {V_{Ij} - V_{Ii} - {R_{g}{gVt}_{ij}}} \right)} - {\quad{\left\lbrack {{V\; \left( {{\overset{\_}{b}}_{i}^{g},{\overset{\_}{b}}_{i}^{a}} \right)} + {\frac{{\partial V}{\overset{\_}{\; V}}_{ij}}{\partial b^{g}}\delta \; b^{g}} + {\frac{{\partial V}{\overset{\_}{\; V}}_{ij}}{\partial b^{a}}\delta \; b^{a}}} \right\rbrack,{{r_{{VP}_{ij}}\left( {R_{ci}R_{0}} \right)^{T}\left( {P_{ci} + {R_{cj}P_{0}} - \left( {P_{ci} + {R_{ci}P_{0}}} \right) - {V_{Ii}{Vt}_{it}} - {\frac{1}{2}R_{0}R_{g}{gVt}_{ij}^{2}}} \right)} - {\quad{\left\lbrack {{V\left( {{\overset{\_}{b}}_{i}^{g},{\overset{\_}{b}}_{i}^{a}} \right)} + {\frac{{\partial V}\; {\overset{\_}{P}}_{ij}}{\partial b^{g}}\delta \; b^{g}} + {\frac{\partial{VP}_{ij}}{\partial b^{a}}\delta \; b^{a}}} \right\rbrack,.}}}}}}} & (20) \end{matrix}$

In some embodiments of the disclosure, the method further includes: obtaining derivatives of errors with respect to status variables to be optimized through a disturbance model of Lie algebra.

In detail, the Jacobian matrix of the error (r_(ΔR) _(ij) , r_(ΔV) _(ij) , r_(ΔP) _(ij) ) relative to the status variables (S={R, P, V, b^(g), b^(a), R₀, P₀, R}) that needs to be optimized may be obtained through the disturbance model of Lie algebra. The global variables R₀, P₀ and R_(g) are tightly coupled in the global optimization function, thus realizing self-calibration in the global optimization process, and the calibration result will not cause error accumulation. The Jacobian matrix of the IMU error term may be obtained, i.e., J_(B), J_(C) and J_(D) in FIG. 6, and may be combined with J_(A) ^(T)J_(A), to obtain J(ξ)^(T)J(ξ) in FIG. 6. J(ξ)^(T)r(ξ) may be obtained in the same way. The update amounts δ may be obtained through sparse matrix multiplication, thus realizing the global optimization of visual and IMU information

At block S103, an estimated value of bias of the IMU is obtained, and an error loop and a correct loop are identified according to the estimated value of bias of the IMU.

It is understandable that the correctness of loop detection is detected by the estimated value of bias of the IMU, so that the system may accurately identify error and correct loops. When loops are detected, the global consistency of vision and IMU is achieved through global optimization of the IMU. That is, with the embodiments of the disclosure, the removal of the error loop may be realized through the change of bias of the IMU, thereby accurately identifying the correct loop and the error loop.

In detail, the error loop may be detected, which may achieve the global consistency of the mapping. The wrong error loop detection will destroy this global consistency. When the correct loop detection occurs, the estimated value of bias will not change largely, and the when the wrong loop detection occurs, the consistency of the mapping is destroyed. In order to fit the unreasonable deformation of the trajectory when the error loop occurs, the update amount of the bias of the IMU will suddenly increase. Therefore, the correctness of the current loop detection may be judged according to the change of the bias of the IMU. If there is a sudden change in the bias of the IMU, the current loop detection is cancelled, so that accurate error loop removal may be achieved and the robustness of the system is improved.

In summary, the purpose of the embodiments of the disclosure is to analyze the sources of the main complexity in the global optimization, to realize accelerated calculations through derivation, to greatly reduce the overall computational complexity, and to realize real-time global optimization of visual and IMU information based on CPU, which ensures global consistency and enables the system to run on portable devices. At the same time, the tightly coupled self-calibration is added to the global optimization, which avoids the complicated process and error accumulation of offline calibration, and also avoids the error problem of the initialization process. After obtaining an accurate estimated value of the bias of the IMU through global optimization, the error loop and the correct loop are accurately identified through the change of the bias of the IMU.

In addition, some embodiments of the disclosure use experimental equipment as shown in FIG. 7: Xtion depth camera+IMU (SC-AHRS-100D2)+Microsoft Surface Pro to conduct experiments, simulations, and use. The experimental results verify that the speed of global optimization has been greatly improved, and real-time 3D reconstruction based on global optimization of visual and IMU information may be realized on portable devices. The IMU information may be used to achieve accurate camera positioning when visual tracking fails, and it may successfully cope with scenes with few texture features and fast movement. The correctness of loop detection may be successfully identified, thereby ensuring global consistency.

It should be noted that the embodiments of the disclosure may realize the method for global optimization and determining an error loop in 3-dimensional reconstruction by changing the design, for example, constructing the Jacobian matrix of visual optimization through the statistics of visual information, and only performing visual optimization; changing the arrangement structure of the overall Jacobian matrix during the global optimization of vision and IMU; judging the operating status of the system through the change of bias of the IMU and checking the correctness of visual tracking. In addition, the embodiments of the disclosure also have other uses, for example, when the visual and IMU information are jointly optimized, the method is used to accelerate the calculation.

With the method for global optimization and determining an error loop in 3-dimensional reconstruction, provided in the embodiments of the disclosure, high-efficiency global optimization of visual and IMU information is realized without loss of accuracy, and the system may run on portable devices in real time. Tightly coupled self-calibration may obtain accurate camera and IMU transformation matrices and there is no problem of accumulated error caused by inaccurate calibration. The accurate loop correctness can be judged based on the changes of bias of the IMU obtained by optimization, which is simple and easy to be achieved.

According to the embodiments of the disclosure, the disclosure also provides an electronic device and a readable storage medium.

FIG. 8 is a block diagram of an electronic device for implementing the above method according to some embodiments of the disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections and relations, and their functions are merely examples, and are not intended to limit the implementation of the disclosure described and/or required herein.

As illustrated in FIG. 8, the electronic device includes: one or more processors 701, a memory 702, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and can be mounted on a common mainboard or otherwise installed as required. The processor may process instructions executed within the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input/output device such as a display device coupled to the interface. In other embodiments, a plurality of processors and/or buses can be used with a plurality of memories and processors, if desired. Similarly, a plurality of electronic devices can be connected, each providing some of the necessary operations (for example, as a server array, a group of blade servers, or a multiprocessor system). A processor 701 is taken as an example in FIG. 8.

The memory 702 is a non-transitory computer-readable storage medium according to the disclosure. The memory stores instructions executable by at least one processor, so that the at least one processor executes the method according to the disclosure. The non-transitory computer-readable storage medium of the disclosure stores computer instructions, which are used to cause a computer to execute the method according to the disclosure.

As a non-transitory computer-readable storage medium, the memory 702 is configured to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions/modules corresponding to the method in the embodiments of the disclosure. The processor 701 executes various functional applications and data processing of the server by running non-transitory software programs, instructions, and modules stored in the memory 702, that is, implementing the method in the foregoing method embodiment.

The memory 702 may include a storage program area and a storage data area, where the storage program area may store an operating system and application programs required for at least one function. The storage data area may store data created according to the use of the electronic device, and the like. In addition, the memory 702 may include a high-speed random-access memory, and a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 702 may optionally include a memory remotely disposed with respect to the processor 701, and these remote memories may be connected to the electronic device through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

The electronic device for implementing the above method may further include: an input device 703 and an output device 704. The processor 701, the memory 702, the input device 703, and the output device 704 may be connected through a bus or in other manners. In FIG. 8, the connection through the bus is taken as an example.

The input device 703 may receive inputted numeric or character information, and generate key signal inputs related to user settings and function control of an electronic device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, an indication rod, one or more mouse buttons, trackballs, joysticks and other input devices. The output device 704 may include a display device, an auxiliary lighting device (for example, an LED), a haptic feedback device (for example, a vibration motor), and the like. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.

Various embodiments of the systems and technologies described herein may be implemented in digital electronic circuit systems, integrated circuit systems, application specific integrated circuits (ASICs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may be implemented in one or more computer programs, which may be executed and/or interpreted on a programmable system including at least one programmable processor. The programmable processor may be dedicated or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.

These computing programs (also known as programs, software, software applications, or code) include machine instructions of a programmable processor and may utilize high-level processes and/or object-oriented programming languages, and/or assembly/machine languages to implement these calculation procedures. As used herein, the terms “machine-readable medium” and “computer-readable medium” refer to any computer program product, device, and/or device used to provide machine instructions and/or data to a programmable processor (for example, magnetic disks, optical disks, memories, programmable logic devices (PLDs), including machine-readable media that receive machine instructions as machine-readable signals. The term “machine-readable signal” refers to any signal used to provide machine instructions and/or data to a programmable processor.

In order to provide interaction with a user, the systems and techniques described herein may be implemented on a computer having a display device (e.g., a Cathode Ray Tube (CRT) or a Liquid Crystal Display (LCD) monitor for displaying information to a user); and a keyboard and pointing device (such as a mouse or trackball) through which the user can provide input to the computer. Other kinds of devices may also be used to provide interaction with the user. For example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or haptic feedback), and the input from the user may be received in any form (including acoustic input, voice input, or tactile input).

The systems and technologies described herein can be implemented in a computing system that includes background components (for example, a data server), or a computing system that includes middleware components (for example, an application server), or a computing system that includes front-end components (For example, a user computer with a graphical user interface or a web browser, through which the user can interact with the implementation of the systems and technologies described herein), or include such background components, intermediate computing components, or any combination of front-end components. The components of the system may be interconnected by any form or medium of digital data communication (egg, a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.

The computer system may include a client and a server. The client and server are generally remote from each other and interacting through a communication network. The client-server relation is generated by computer programs running on the respective computers and having a client-server relation with each other.

It should be understood that various forms of processes shown above may be used to reorder, add, or delete steps. For example, the steps described in the disclosure may be performed in parallel, sequentially, or in different orders. As long as the desired results of the technical solutions disclosed in the disclosure can be achieved, no limitation is made herein.

The above specific embodiments do not constitute a limitation on the protection scope of the disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent replacement and improvement made within the spirit and principle of this application shall be included in the protection scope of this application. 

What is claimed is:
 1. A 3-dimensional reconstruction method, implemented in a portable terminal with a camera and an inertial measurement unit, and the method comprising: obtaining data captured by the camera and data captured by the inertial measurement unit; obtaining a pose of the camera based on the data captured by the camera and the data captured by the inertial measurement unit; obtaining an adjustment value of the pose of the camera and an adjustment value of bias of the inertial measurement unit based on a second-order statistics of the data captured by the camera and a pre-integration of the data captured by the inertial measurement unit; updating the pose of the camera based on the adjustment value of the pose of the camera; determining whether the adjustment value of bias of the inertial measurement unit is less than a preset value; in response to the adjustment value of bias of the inertial measurement unit being greater than or equal to the preset value, determining that a current loop for 3-dimensional reconstruction is an error loop, the current loop being a connection of the pose of the camera with a previous pose of the camera; removing the error loop; and constructing a 3-dimensional model for surroundings of the camera based on the updated pose of the camera and remaining loops.
 2. The method as claimed in claim 1, further comprising: in response to the adjustment value of bias of the inertial measurement unit being less than the preset value, determining that the current loop for 3-dimensional reconstruction is a right loop, and remaining the current loop for 3-dimensional reconstruction.
 3. The method as claimed in claim 2, further comprising: in response to the adjustment value of bias of the inertial measurement unit being less than the preset value, updating the bias of the inertial measurement unit based on the adjustment value of bias of the inertial measurement unit.
 4. The method as claimed in claim 1, wherein the camera comprises an RGB-depth camera.
 5. The method as claimed in claim 4, wherein the data captured by the camera comprises a plurality of color images and depth maps, and the data captured by the inertial measurement unit comprises a plurality of inertial data, each of the plurality of color images and depth maps corresponding to one of the plurality of inertial data.
 6. The method as claimed in claim 5, wherein obtaining the adjustment value of the pose of the camera based on the second-order statistics of the data captured by the camera and the pre-integration of the data captured by the inertial measurement unit, comprises: obtaining the adjustment value of the pose of the camera based on a Jacobian matrix formed based on the second-order statistics of the data captured by the camera and the pre-integration of the data captured by the inertial measurement unit.
 7. The method as claimed in claim 6, wherein, the Jacobian matrix comprising a visual Jacobian matrix and an inertial Jacobian matrix, the visual Jacobian matrix comprises a sum of a plurality of sub visual Jacobian matrices, and is denoted by the following formula of: J(ξ)^(T) J(ξ)=ΣJ _(C) _(i,j) ^(T) J _(C) _(i,j) , where, J(ξ)^(T) J(ξ) represents the visual Jacobian matrix, ξ represents the pose of the camera, J_(C) _(i,j) ^(T)J_(C) _(i,j) represents the sub visual Jacobian matrix, and is denoted by the following formula of: ${{J_{C_{i,j}}^{T}J_{C_{i,j}}} = \begin{bmatrix} {{A_{C_{i,j}}\left( {i,i} \right)},{A_{C_{i,j}}\left( {i,j} \right)}} \\ {{A_{C_{i,j}}\left( {j,i} \right)},{A_{C_{i,j}}\left( {j,j} \right)}} \end{bmatrix}},$ C_(i,j) represents a set of matched feature points in a registered frame pair of frames i and j of color images and depth maps, ${{A_{C_{i,i}}\left( {i,i} \right)} = {{\sum\limits_{k = 0}^{{C_{i,j}} - 1}\; {J_{ik}^{T}J_{ik}}} = \begin{bmatrix} {{C_{i,j}}I_{3 \times 3}} & {- \left\lbrack {R_{i}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{i}^{k}}} \right\rbrack_{\times}} \\ {- \left\lbrack {R_{i}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{i}^{k}}} \right\rbrack_{\times}} & {\sum\limits_{k = 0}^{{C_{i,j}} - 1}{\left\lbrack {R_{i}P_{i}^{k}} \right\rbrack_{\times}^{T}\left\lbrack {R_{i}P_{i}^{k}} \right\rbrack}_{\times}} \end{bmatrix}}},{{A_{C_{i,j}}\left( {i,j} \right)} = {{\sum\limits_{k = 0}^{{C_{i,j}} - 1}\; {J_{ik}^{T}J_{ik}}} = \begin{bmatrix} {{C_{i,j}}I_{3 \times 3}} & {- \left\lbrack {R_{j}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{j}^{k}}} \right\rbrack_{\times}} \\ {- \left\lbrack {R_{i}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{i}^{k}}} \right\rbrack_{\times}} & {\sum\limits_{k = 0}^{{C_{i,j}} - 1}{\left\lbrack {R_{i}P_{i}^{k}} \right\rbrack_{\times}^{T}\left\lbrack {R_{j}P_{j}^{k}} \right\rbrack}_{\times}} \end{bmatrix}}},{{A_{C_{j,i}}\left( {j,i} \right)} = {{\sum\limits_{k = 0}^{{C_{i,j}} - 1}\; {J_{jk}^{T}J_{ik}}} = {\quad{\begin{bmatrix} {{C_{i,j}}I_{3 \times 3}} & {- \left\lbrack {R_{i}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{i}^{k}}} \right\rbrack_{\times}} \\ {- \left\lbrack {R_{j}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{j}^{k}}} \right\rbrack_{\times}} & {\sum\limits_{k = 0}^{{C_{i,j}} - 1}{\left\lbrack {R_{j}P_{j}^{k}} \right\rbrack_{\times}^{T}\left\lbrack {R_{i}P_{i}^{k}} \right\rbrack}_{\times}} \end{bmatrix},{{A_{C_{j,j}}\left( {j,j} \right)} = {{\sum\limits_{k = 0}^{{C_{i,j}} - 1}\; {J_{jk}^{T}J_{jk}}} = \begin{bmatrix} {{C_{i,j}}I_{3 \times 3}} & {- \left\lbrack {R_{j}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{j}^{k}}} \right\rbrack_{\times}} \\ {- \left\lbrack {R_{j}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{j}^{k}}} \right\rbrack_{\times}} & {\sum\limits_{k = 0}^{{C_{i,j}} - 1}{\left\lbrack {R_{j}P_{j}^{k}} \right\rbrack_{\times}^{T}\left\lbrack {R_{j}P_{j}^{k}} \right\rbrack}_{\times}} \end{bmatrix}}},}}}}$ k represents the matched feature point, ∥C_(i,j)∥ represents a number of the set of matched feature points, I_(3×3) represents a unit matrix of 3×3, R_(j) represents a rotation matrix of frame j, R_(i) represents a rotation matrix of frame i, P_(j) ^(k) represents a point coordinate of matched feature point k in frame j, P_(i) ^(k) represents a point coordinate of matched feature point k in frame i, x represents a skew symmetric matrix.
 8. The method as claimed in claim 7, wherein the inertial Jacobian matrix is obtained by: obtaining a residual function of inertial status variables by combining the pose of the camera; and obtaining the inertial Jacobian matrix of the residual function to the pose of the camera and the inertial status variables.
 9. The method as claimed in claim 8, wherein the adjustment value of the pose of the camera is a sum of the visual Jacobian matrix and the inertial Jacobian matrix, and the adjustment value of bias of the inertial measurement unit is obtained based on the inertial Jacobian matrix.
 10. A 3-dimensional reconstruction device, implemented in a portable terminal with a camera and an inertial measurement unit, and the device comprising: a processor; and a memory for storing instructions executable by the processor, wherein the processor is configured to carry out: obtaining data captured by the camera and data captured by the inertial measurement unit; obtaining a pose of the camera based on the data captured by the camera and the data captured by the inertial measurement unit; obtaining an adjustment value of the pose of the camera and an adjustment value of bias of the inertial measurement unit based on a second-order statistics of the data captured by the camera and a pre-integration of the data captured by the inertial measurement unit; updating the pose of the camera based on the adjustment value of the pose of the camera; determining whether the adjustment value of bias of the inertial measurement unit is less than a preset value; in response to the adjustment value of bias of the inertial measurement unit being greater than or equal to the preset value, determining that a current loop for 3-dimensional reconstruction is an error loop, the current loop being a connection of the pose of the camera with a previous pose of the camera; removing the error loop; and constructing a 3-dimensional model for surroundings of the camera based on the updated pose of the camera and remaining loops.
 11. The device as claimed in claim 10, wherein the processor is further configured to carry out: in response to the adjustment value of bias of the inertial measurement unit being less than the preset value, determining that the current loop for 3-dimensional reconstruction is a right loop, and remaining the current loop for 3-dimensional reconstruction.
 12. The device as claimed in claim 11, wherein the processor is further configured to carry out: in response to the adjustment value of bias of the inertial measurement unit being less than the preset value, updating the bias of the inertial measurement unit based on the adjustment value of bias of the inertial measurement unit.
 13. The device as claimed in claim 10, wherein the camera comprises an RGB-depth camera.
 14. The device as claimed in claim 13, wherein the data captured by the camera comprises a plurality of color images and depth maps, and the data captured by the inertial measurement unit comprises a plurality of inertial data, each of the plurality of color images and depth maps corresponding to one of the plurality of inertial data.
 15. The device as claimed in claim 14, wherein obtaining the adjustment value of the pose of the camera based on the second-order statistics of the data captured by the camera and the pre-integration of the data captured by the inertial measurement unit, comprises: obtaining the adjustment value of the pose of the camera based on a Jacobian matrix formed based on the second-order statistics of the data captured by the camera and the pre-integration of the data captured by the inertial measurement unit.
 16. The device as claimed in claim 15, wherein, the Jacobian matrix comprising a visual Jacobian matrix and an inertial Jacobian matrix, the visual Jacobian matrix comprises a sum of a plurality of sub visual Jacobian matrices, and is denoted by the following formula of: J(ξ)^(T) J(ξ)=ΣJ _(C) _(i,j) ^(T) J _(C) _(i,j) , where, J(ξ)^(T) J(ξ) represents the visual Jacobian matrix, ξ represents the pose of the camera, J_(C) _(i,j) ^(T)J_(C) _(i,j) represents the sub visual Jacobian matrix, and is denoted by the following formula of: ${{J_{C_{i,j}}^{T}J_{C_{i,j}}} = \begin{bmatrix} {{A_{C_{i,j}}\left( {i,i} \right)},{A_{C_{i,j}}\left( {i,j} \right)}} \\ {{A_{C_{i,j}}\left( {j,i} \right)},{A_{C_{i,j}}\left( {j,j} \right)}} \end{bmatrix}},$ C_(i,j) represents a set of matched feature points in a registered frame pair of frames i and j of color images and depth maps, ${{A_{C_{i,j}}\left( {i,i} \right)} = {{\sum\limits_{k = 0}^{{C_{i,j}} - 1}\; {J_{ik}^{T}J_{ik}}} = \begin{bmatrix} {{C_{i,j}}I_{3 \times 3}} & {- \left\lbrack {R_{i}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{i}^{k}}} \right\rbrack_{\times}} \\ {- \left\lbrack {R_{i}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{i}^{k}}} \right\rbrack_{\times}} & {\sum\limits_{k = 0}^{{C_{i,j}} - 1}{\left\lbrack {R_{i}P_{i}^{k}} \right\rbrack_{\times}^{T}\left\lbrack {R_{i}P_{i}^{k}} \right\rbrack}_{\times}} \end{bmatrix}}},{{A_{C_{i,j}}\left( {i,j} \right)} = {{\sum\limits_{k = 0}^{{C_{i,j}} - 1}\; {J_{ik}^{T}J_{ik}}} = \begin{bmatrix} {{C_{i,j}}I_{3 \times 3}} & {- \left\lbrack {R_{j}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{j}^{k}}} \right\rbrack_{\times}} \\ {- \left\lbrack {R_{i}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{i}^{k}}} \right\rbrack_{\times}} & {\sum\limits_{k = 0}^{{C_{i,j}} - 1}{\left\lbrack {R_{i}P_{i}^{k}} \right\rbrack_{\times}^{T}\left\lbrack {R_{j}P_{j}^{k}} \right\rbrack}_{\times}} \end{bmatrix}}},{{A_{C_{j,i}}\left( {j,i} \right)} = {{\sum\limits_{k = 0}^{{C_{i,j}} - 1}\; {J_{jk}^{T}J_{ik}}} = {\quad{\begin{bmatrix} {{C_{i,j}}I_{3 \times 3}} & {- \left\lbrack {R_{i}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{i}^{k}}} \right\rbrack_{\times}} \\ {- \left\lbrack {R_{j}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{j}^{k}}} \right\rbrack_{\times}} & {\sum\limits_{k = 0}^{{C_{i,j}} - 1}{\left\lbrack {R_{j}P_{j}^{k}} \right\rbrack_{\times}^{T}\left\lbrack {R_{i}P_{i}^{k}} \right\rbrack}_{\times}} \end{bmatrix},{{A_{C_{j,j}}\left( {j,j} \right)} = {{\sum\limits_{k = 0}^{{C_{i,j}} - 1}\; {J_{jk}^{T}J_{jk}}} = \begin{bmatrix} {{C_{i,j}}I_{3 \times 3}} & {- \left\lbrack {R_{j}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{j}^{k}}} \right\rbrack_{\times}} \\ {- \left\lbrack {R_{j}{\sum\limits_{k = 0}^{{C_{i,j}} - 1}P_{j}^{k}}} \right\rbrack_{\times}} & {\sum\limits_{k = 0}^{{C_{i,j}} - 1}{\left\lbrack {R_{j}P_{j}^{k}} \right\rbrack_{\times}^{T}\left\lbrack {R_{j}P_{j}^{k}} \right\rbrack}_{\times}} \end{bmatrix}}},}}}}$ k represents the matched feature point, ∥C_(i,j)∥ represents a number of the set of matched feature points, I_(3×3) represents a unit matrix of 3×3, R_(j) represents a rotation matrix of frame j, R_(i) represents a rotation matrix of frame i, P_(j) ^(k) represents a point coordinate of matched feature point k in frame j, P_(i) ^(k) represents a point coordinate of matched feature point k in frame i, x represents a skew symmetric matrix.
 17. The device as claimed in claim 16, wherein the inertial Jacobian matrix is obtained by: obtaining a residual function of inertial status variables by combining the pose of the camera; and obtaining the inertial Jacobian matrix of the residual function to the pose of the camera and the inertial status variables.
 18. The device as claimed in claim 17, wherein the adjustment value of the pose of the camera is a sum of the visual Jacobian matrix and the inertial Jacobian matrix, and the adjustment value of bias of the inertial measurement unit is obtained based on the inertial Jacobian matrix.
 19. A non-transitory computer-readable storage medium having stored therein instructions that, when executed by a processor of a terminal, causes the terminal to perform a 3-dimensional reconstruction method, the terminal comprising a camera and an inertial measurement unit, the method comprising: obtaining data captured by the camera and data captured by the inertial measurement unit; obtaining a pose of the camera based on the data captured by the camera and the data captured by the inertial measurement unit; obtaining an adjustment value of the pose of the camera and an adjustment value of bias of the inertial measurement unit based on a second-order statistics of the data captured by the camera and a pre-integration of the data captured by the inertial measurement unit; updating the pose of the camera based on the adjustment value of the pose of the camera; determining whether the adjustment value of bias of the inertial measurement unit is less than a preset value; in response to the adjustment value of bias of the inertial measurement unit being greater than or equal to the preset value, determining that a current loop for 3-dimensional reconstruction is an error loop, the current loop being a connection of the pose of the camera with a previous pose of the camera; removing the error loop; and constructing a 3-dimensional model for surroundings of the camera based on the updated pose of the camera and remaining loops.
 20. The non-transitory computer-readable storage medium as claimed in claim 19, wherein the method further comprises: in response to the adjustment value of bias of the inertial measurement unit being less than the preset value, determining that the current loop for 3-dimensional reconstruction is a right loop, and remaining the current loop for 3-dimensional reconstruction. 